package datastructure
{
	import data.AppConfig;

	public class RBTreeNode
	{
		private var _key:int;
		private var _color:int = AppConfig.BLACK;	//节点默认为黑色
		
		private var _left:RBTreeNode;
		private var _right:RBTreeNode;
		private var _parent:RBTreeNode = null;
		
		public var distance:int = 0;
		public var OffsetX:int = 0;
		public var xCoordinate:int;
		public var yCoordinate:int;
		
		public function RBTreeNode(key:int)
		{
			this._key = key;			
		}
		
		public function get key():int
		{
			return this._key;
		}
		
		public function set key(key:int):void
		{
			this._key = key;
		}
		
		public function set left(left:RBTreeNode):void
		{
			this._left = left;
		}
		
		public function get left():RBTreeNode
		{
			return this._left;
		}
		
		public function set right(right:RBTreeNode):void
		{
			this._right = right;
		}
		
		public function get right():RBTreeNode
		{
			return this._right;
		}
		
		public function set parent(parent:RBTreeNode):void
		{
			this._parent = parent;
		}
		
		public function get parent():RBTreeNode
		{
			return this._parent;
		}
		
		public function set color(color:int):void
		{
			this._color = color;
		}
		
		public function get color():int
		{
			return this._color;
		}
		
	}
}